int1 = int(input())
str1 = input()
str2 = "sdu120"
ncount = str1.count(str2)
print(ncount)
#